package com.lnold.redis.config;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class ClientApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(ClientApplication.class, args);

        // 获取ConfigSubscriber bean并手动订阅配置更新消息
        ConfigSubscriber configSubscriber = context.getBean(ConfigSubscriber.class);
        configSubscriber.subscribe();
    }
}